/*
 * clerk.h
 *
 *  Created on: May 30, 2011
 *      Author: peckb1
 */

#ifndef CLERK_H_
#define CLERK_H_

#include "synch.h"
#include "bool.h"
#include "system.h"

#include "item.h"
#include "cashregister.h"
#include "locks.h"


class Clerk {
    public:
        Clerk(Locks* allTheLocks);
        ~Clerk();

        /*
         * Our Clerk thread's execution method
         * This is what will be called upon putting a Clerk to work
         *
         * @param The integer representing the register we are working on
         */
        void GoToWork(int lineId);

    private:
        bool haveAJob;
        Locks* theLocks;
        int currentRegister;

        // Private method called when a customer needs help paying for some items
        void HelpCustomerCheckout(bool customerWantsToReturn);

        // private method for finishing with a customer
        void FinishWithScanningCustomer(bool customerWantsToReturn);

};

#endif /* CLERK_H_ */
